package com.cskaoyan.com.generic.generic2;

public class Demo2 {
    public static void main(String[] args) {


//        User21 user21 = new User21();
//        Object name = user21.name;

        User22 user22 = new User22();
        String name = user22.name;

        User23 user23 = new User23();
        Integer name1 = user23.name;


        User24<Integer> user24 = new User24<>();
        String name2 = user24.name;

        User25<Integer> integerUser25 = new User25<>();
        Integer name3 = integerUser25.name;
    }
}

class People < T >{
    T name;
}
class User21 extends People{ }
class User22 extends People<String>{ }
class User23 extends People<Integer>{ }
class User24 <X> extends People<String>{ }
class User25 <X> extends People<X>{ }
class User26 <T> extends People<T>{ }

